<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"  %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP 'booklist.jsp' starting page</title>


</head>

<body>
	<s:form action="book.action" method="post" theme="simple">
	书名:<s:textfield name="bw.name"/><br/>
	出版社:<s:select name="bw.pubid" list="pubs" listKey="id" listValue="name" 
	headerKey="0" headerValue="--全部--"/><br/>
	分类:<s:select name="bw.catid" list="cats" listKey="id" listValue="name" 
	headerKey="0" headerValue="--全部--"/><br/>
	
	价格:<s:select list="#{0:'--全部--',1:'50元以下',2:'50-100元之间',3:'100元以上'}" name="bw.priceSel"/>
	<br/>
	排序:<s:select list="#{'id':'编号','title':'书名','unitprice':'价格'}" name="bw.orderby"/>
	
	<s:checkbox name="bw.desc"/>降序
	每页:<s:select list="{10,20,40}" name="pageSize"/>条<br/>
	<s:hidden name="pageIndex" id="txtP"/>
	<s:submit value="查询" id="btn1"/>
	</s:form>
	<script type="text/javascript">
		function gotoPage(n){
		  document.getElementById("txtP").value=n;
		  document.getElementById("btn1").click();
		
		}
	
	
	</script>
	<table border="1" width="100%">
	<tr>
	   <th>编号</th>
	    <th>书名</th>
	     <th>价格</th>
	
	
	</tr>
	
	
	<s:iterator value="#pg.result" var="b">
	<tr>
	   <th>${b.id }</th>
	    <th>${b.title }</th>
	     <th>${b.unitprice }</th>
	
	
	</tr>
	
	
	</s:iterator>
	<tr>
	
	<td colspan="3">${nav}</td>
	
	</tr>
</table>	
</body>
</html>


